package com.guang.my_xxx_job.controller;

import com.guang.my_xxx_job.domain.dto.UserDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);

    @PostMapping("/getUserDTO")
    public UserDTO getUserDTO(@RequestBody UserDTO userDTO){
        logger.info("获取得到的userDto的值是：{}",userDTO.toString());
        return userDTO;
    }

    @GetMapping("/test")
    public String test(){
        return "hello,xxx_job";
    }

}
